A processor executes an application program by executing programming instructions of the application program in sequence. The particular programming instructions and sequence executed frequently depend on certain run-time conditions. For example, a calendar program may comprise instructions to output the day of the week onto a display. Within these instructions is a code segment of instructions for outputting the word “Monday,” a code segment of instructions for outputting the word “Tuesday,” and so on for the other days of the week. The calendar program selects which code segment is appropriate to execute based on a determination of the current date. Thus, the code segment that outputs the word “Monday” is executed on a Monday, but is not executed on any other day of the week. Further, the calendar application may ordinarily execute the code segments according to the sequence Monday, followed by Tuesday. However, the user may be permitted to manually set the clock backwards, in which case, the sequence could be executed according to the sequence Tuesday, followed by Monday.
From this simple example, it is evident that the instructions executed by application program may depend on the conditions under which the application program is running. Such conditions are myriad, and often include input provided by a user, other executing programs, the contents of data being processed by the application program, and so on. In view of all the factors that may influence how application program executes, the execution flow of such an application program can be quite complex.
An execution trace of an application program can be helpful toward understanding which instructions were executed during the execution of an application program, and in what sequence. Such an execution trace is, at times, a valuable tool for finding errors in the application program, such as by identifying at what point the application program began executing an unintended code segment or triggering errors.